Update the README for npmjs#1233
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the npmjs README to provide a cleaner, more concise documentation structure for the rclnodejs package. The update simplifies the README content while maintaining essential information for users.
Key changes:
- Adds a note about ROS 2 LTS support and development scope
- Streamlines installation and prerequisites sections with updated ROS 2 references
- Removes verbose example code sections in favor of directing users to example repositories
- Updates TypeScript configuration recommendations and examples
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| `rclnodejs` is a Node.js client for the Robot Operating System (ROS 2). It provides a simple and easy JavaScript API for ROS 2 programming. TypeScript declarations are included to support use of rclnodejs in TypeScript projects. | ||
|
|
||
| \* rclnodejs development and maintenance is limited to all active ROS 2 LTS releases and the Rolling development branch |
There was a problem hiding this comment.
The backslash before the asterisk (\*) creates escaped markdown. This should be just * to render as a proper bullet point, or use - for consistency with other list items in the document.
| \* rclnodejs development and maintenance is limited to all active ROS 2 LTS releases and the Rolling development branch | |
| - rclnodejs development and maintenance is limited to all active ROS 2 LTS releases and the Rolling development branch |
| import * as rclnodejs from 'rclnodejs'; | ||
| rclnodejs.init().then(() => { | ||
| const node = rclnodejs.createNode('publisher_example_node'); | ||
| const node = new rclnodejs.Node('publisher_example_node'); |
There was a problem hiding this comment.
The TypeScript example uses new rclnodejs.Node() while the JavaScript example uses rclnodejs.createNode(). This inconsistency could confuse users about the correct API usage. Consider using the same pattern in both examples for clarity.
| const node = new rclnodejs.Node('publisher_example_node'); | |
| const node = rclnodejs.createNode('publisher_example_node'); |
| const publisher = node.createPublisher('std_msgs/msg/String', 'topic'); | ||
| publisher.publish(`Hello ROS 2 from rclnodejs`); | ||
| rclnodejs.spin(node); | ||
| node.spin(); |
There was a problem hiding this comment.
The TypeScript example uses node.spin() while the JavaScript example uses rclnodejs.spin(node). This API inconsistency could confuse users. Both examples should demonstrate the same API pattern for consistency.
| node.spin(); | |
| rclnodejs.spin(node); |
This PR updates the npmjs README to provide a cleaner, more concise documentation structure for the rclnodejs package. The update simplifies the README content while maintaining essential information for users. Key changes: - Adds a note about ROS 2 LTS support and development scope - Streamlines installation and prerequisites sections with updated ROS 2 references - Removes verbose example code sections in favor of directing users to example repositories - Updates TypeScript configuration recommendations and examples Fix: #1232
This PR updates the npmjs README to provide a cleaner, more concise documentation structure for the rclnodejs package. The update simplifies the README content while maintaining essential information for users.
Key changes:
Fix: #1232